home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 520 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.8 KB

  1. From: claus@faerber.muc.de (Claus A. Faerber)
  2. Message-ID: <62yZxIJZcDB@faerber.muc.de>
  3. X-Original-Date: Fri, 16 Feb 1996 01:00:00 +0100
  4. Path: in1.uu.net!bounce-back
  5. Date: 19 Feb 96 02:01:40 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. Newsgroups: comp.std.c++
  9. In-Reply-To: <62HLdPo3cDB@faerber.muc.de>
  10. Subject: Re: Give operator. a chance
  11. X-Mailer: CrossPoint v3.1 R/B17071
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMSfaK+EDnX0m9pzZAQF7jwF/b1Sex85Mnf574ljv5DVUm4BOdIwlbXFT
  14.     Ji17TpjA8BOJGCMxcgeUjSl2OH78ax06
  15.     =6sFX
  16.  
  17. Jerry Coffin <jcoffin@rmii.com> (08 Feb 96):
  18.  
  19. > claus@faerber.muc.de (Claus A. Faerber) wrote:
  20. >
  21. > >IMO there's a better way than 'operator.()':
  22. >
  23. > >Simply say: 'If a class member identifier is not found
  24. > >within an object, all possible cast operators are scanned in
  25. the order of declaration
  26. > >order to find a conversion to an object of a class
  27. > >containing a member with this identifier.'
  28. >
  29. > Which would be chosen if two or more possibilities would work?
  30.  
  31. In the order in which the cast operators appead in the class  
  32. definition.
  33.  
  34. And cast-to classes should be scanned in the same manner as  
  35. the original class in order to find the member, ie. if one  
  36. class the object is casted to doesn't contain the member,  
  37. but a cast op. to a class, which contains it, this path is  
  38. choosen instead of the next cast of the original class.
  39.  
  40.  
  41. Claus
  42.  
  43. ------------------------------------------------------------------------
  44. Claus Andre Faerber - claus@faerber.muc.de - http://www.muc.de/~cfaerber
  45. ------------------------------------------------------------------------
  46. ---
  47. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  48.   Contact address: std-c++-request@ncar.ucar.edu.  Moderation policy:
  49.   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
  50.